\name{ifft}
\alias{ifft}
\title{ Inverse FFT }
\description{
  Matlab/Octave-compatible inverse FFT.
}
\usage{
ifft(x, n)
}
\arguments{
  \item{x}{ the input vector or array. If a 2-D array, perform
    ifft on columns. }
  \item{n}{ number of elements of \code{x} to use. If \code{n} is larger
    than the length of \code{x}, then \code{x} is padded with zeros. If \code{n} is less
    than the length of \code{x}, then \code{x} is truncated. }
}
\details{
  It uses \code{fft} from the stats package as follows:

  \code{fft(x, inverse = TRUE)/length(x)}

  Note that it does not attempt to make the results real.
}
\value{
  The inverse FFT of the input, the same length as \code{x}.
}
\author{ Tom Short }
\seealso{ \code{\link{fft}}, \code{\link{Fft}}}
\examples{
ifft(fft(1:4))
}
\keyword{ math }

